package br.com.uspfc.dao;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import br.com.uspfc.model.Usuario;

@Repository
@Transactional
public class UsuarioDAO {

	@Autowired
	private SessionFactory sessionFactory;
	
	
	public Long adiciona(Usuario usuario){
		return (Long) sessionFactory.getCurrentSession().save(usuario);
	}
}
